﻿namespace SalaryTool.Service.Models
{
    using System;

    public class Employee
    {
        public int Id
        {
            get;

            set;
        }

        public string GivenName
        {
            get;

            set;
        }

        public string Surname
        {
            get;

            set;
        }

        public int MarketPercentageMultiplier
        {
            get;

            set;
        }

        public int Level
        {
            get;

            set;
        }

        public float Salary
        {
            get
            {
                return SalaryCalculator.CalculateSalary(this.Level, this.MarketPercentageMultiplier);
            }
        }

        public override string ToString()
        {
            return string.Format("{0} {1}: {2}%", this.GivenName, this.Surname, this.MarketPercentageMultiplier);
        }
    }
}